<template>
  <Modal :mask-closable="false" class="modal-title-layout" v-model="show" :title="`${$t('common.Delete')}`">
    <div class="icon red">
      <i class="iconfont zy-common-shanchu"></i>
    </div>
    <p class="title">
      <span>{{ desc[index] }}</span>
    </p>
    <div slot="footer">
      <Button type="default" @click="show=false">{{ $t('common.Cancle') }}</Button>
      <Button type="primary" @click="submit">{{ $t('maintenance.Confirmed') }}
      </Button>
    </div>
  </Modal>
</template>

<script>
export default {
  name: "subWarnModalTitle",
  data() {
    return {
      show: false,
      index: "",
      desc: {
        1: this.$t('bdg提示1'),
        2: this.$t('bdg提示2'),
        3: this.$t('bdg提示3'),
      }
    }
  },
  methods: {
    showModal(index) {
      this.show = true
      this.index = index
    },
    submit() {
      this.show = false
      this.$emit('change', this.index)
    }
  }
}
</script>
